from django.conf.urls import patterns, include, url
import views, settings
from django.views.static import serve
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', views.index, name = "index"),
#    url(r'^register/$', views.register, name = "register"),
#    url(r'^new_article/$', views.new_article, name = "new_article"),
#    url(r'^edit_article/(?P<article_id>\w+)$', views.edit_article, name = "edit_article"),
    url(r'^single_article/(?P<article_id>\w+)$', views.view_single_article, name = "view_single_article"),
    url(r'^delete_article/(?P<article_id>\w+)$', views.delete_article, name = "delete_article"),
    url(r'^(?P<day>\w+)/(?P<month>\w+)/(?P<year>\w+)$', views.view_specific_day, name = "view_posts_specific_day"),
    url(r'^category/(?P<categories>\w+)$', views.view_in_categories, name = "view_posts_in_category"),
    url(r'^account/(?P<account_id>\w+)$', views.view_by_account, name = "view_posts_by_account"),
    url(r'^login/$', views.user_login, name="login"),

#    url(r'^activate/$', views.activate, name = "activate"),
    url(r'ajax/$', views.update_ajax, name="ajax"),
#    url(r'headline/$', views.headline, name="headline"),
    (r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}),
    # url(r'^linktaichinh/', include('linktaichinh.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^linktaichinh/static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}),
    (r'^tinymce/', include('tinymce.urls')),
)
